package com.ruoyi.askcase.service.impl;

import java.util.HashMap;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.askcase.mapper.AskCaseMapper;
import com.ruoyi.askcase.domain.AskCase;
import com.ruoyi.askcase.service.IAskCaseService;

/**
 * 病例管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-25
 */
@Service
public class AskCaseServiceImpl implements IAskCaseService 
{
    @Autowired
    private AskCaseMapper askCaseMapper;

    /**
     * 查询病例管理
     * 
     * @param caseId 病例管理主键
     * @return 病例管理
     */
    @Override
    public AskCase selectAskCaseByCaseId(Long caseId)
    {
        return askCaseMapper.selectAskCaseByCaseId(caseId);
    }

    /**
     * 查询病例管理列表
     * 
     * @param askCase 病例管理
     * @return 病例管理
     */
    @Override
    public List<AskCase> selectAskCaseList(AskCase askCase)
    {
        return askCaseMapper.selectAskCaseList(askCase);
    }

    /**
     * 新增病例管理
     * 
     * @param askCase 病例管理
     * @return 结果
     */
    @Override
    public int insertAskCase(AskCase askCase)
    {
        return askCaseMapper.insertAskCase(askCase);
    }

    /**
     * 修改病例管理
     * 
     * @param askCase 病例管理
     * @return 结果
     */
    @Override
    public int updateAskCase(AskCase askCase)
    {
        return askCaseMapper.updateAskCase(askCase);
    }

    /**
     * 批量删除病例管理
     * 
     * @param caseIds 需要删除的病例管理主键
     * @return 结果
     */
    @Override
    public int deleteAskCaseByCaseIds(Long[] caseIds)
    {
        return askCaseMapper.deleteAskCaseByCaseIds(caseIds);
    }

    /**
     * 删除病例管理信息
     * 
     * @param caseId 病例管理主键
     * @return 结果
     */
    @Override
    public int deleteAskCaseByCaseId(Long caseId)
    {
        return askCaseMapper.deleteAskCaseByCaseId(caseId);
    }

    //getHomecaseList
    @Override
    public  List<HashMap<String,Object>> getHomecaseList(Integer nums)
    {
        return askCaseMapper.getHomecaseList(nums);
    }

    @Override
    public List<HashMap<String, Object>> getTwoTreatsBycasId(Long caseId) {
        return askCaseMapper.getTwoTreatsBycasId(caseId);
    }

    @Override
    public List<HashMap<String, Object>> getMycaseListJoin(String openid) {
        return askCaseMapper.getMycaseListJoin(openid);
    }


    @Override
    public List<HashMap<String, Object>> getMycaseList(String openid) {
        return askCaseMapper.getMycaseList(openid);
    }
}
